package com.neusoft.shopping.manager.service;

import com.neusoft.shopping.manager.dao.StockDAOImpl;
import com.neusoft.shopping.manager.entity.StockEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StockService {
    @Autowired
    private StockDAOImpl dao;

    public List<StockEntity> qureyAll(){
        return dao.qureyAll() ;
    }

    public StockEntity qureyOne(Integer stockno){
        return dao.qureyBystockno(stockno) ;
    }

    public int add_stock(StockEntity stock){
        return dao.add_stock(stock);
    }

    public int update_stock(StockEntity stock){
        return dao.update_stockByGoodsno(stock);
    }

    public int del_stock(Integer stockno){
        return dao.del_stock(stockno);
    }

}
